#pragma once

#include <memory>

#include "spdlog/spdlog.h"

// Class for debug logging in the console using the library spdlog
// provides macros for severall logging functions
class Log
{
public:
	static void Init();

	inline static std::shared_ptr<spdlog::logger>& GetCoreLogger() { return m_CoreLogger; }
	inline static std::shared_ptr<spdlog::logger>& GetClientLogger() { return m_ClientLogger; }

private:
	static std::shared_ptr<spdlog::logger> m_CoreLogger;
	static std::shared_ptr<spdlog::logger> m_ClientLogger;
};

#define APPLOG "Log.txt"
#define APPLOG_INFO(...) spdlog::get(APPLOG)->info(__VA_ARGS__)
#define APPLOG_DEBUG(...) spdlog::get(APPLOG)->debug(__VA_ARGS__)
#define APPLOG_TRACE(...) spdlog::get(APPLOG)->trace(__VA_ARGS__)
#define APPLOG_ERROR(...) spdlog::get(APPLOG)->error(__VA_ARGS__)
#define APPLOG_WARNING(...) spdlog::get(APPLOG)->warn(__VA_ARGS__)
#define APPLOG_CRITICAL(...) spdlog::get(APPLOG)->critical(__VA_ARGS__)
#define APPLOG_SEPARATOR() APPLOG_INFO("-----------------------------")